-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add asserts this [is type]
parsing support
#10677
Conversation
}, | ||
"body": [ | ||
{ | ||
"type": "TSDeclareMethod", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, in that example it's correct because there isn't the method body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in e6bf63e.
return false; | ||
} | ||
|
||
const id = this.parseIdentifier(); | ||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is refactor of tsParseTypePredicateAsserts
which aims to avoid creating node by parseIdentifier
.
As a follow-up to #10543, this PR adds
asserts this [is type]
support. In addition, it also fixes an edge case whereasserts
keyword contains escaped sequence.Since we declared TypeScript 3.7 support on 7.7.0, I would expect this PR to be shipped in a patch release.